﻿<%@ Page Title="Thông tin tài khoản" Language="C#" MasterPageFile="~/Areas/CustomerAdmin/Customer.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="OnlineBusinesses.Areas.CustomerAdmin.Profile" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="ContentCustomerAdmin">

    <!-- Tab panes -->
    <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12 lefttab">
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
            <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round" style="padding-top: 10px;">
                    <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"></asp:Label>
                </div>
            </asp:Panel>
            <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round" style="padding-top: 10px;">
                    <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                </div>
            </asp:Panel>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#txtBirthday").jqxDateTimeInput({ width: '120px', height: '34px' });
            if ($('#ContentCustomerAdmin_txtBirthday_v').val() != undefined) {
                $('#txtBirthday').jqxDateTimeInput('val', $('#ContentCustomerAdmin_txtBirthday_v').val());
                $('#ContentCustomerAdmin_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
            }
            $('#txtBirthday').on('valuechanged', function (event) {
                $('#ContentCustomerAdmin_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
                alert($('#ContentCustomerAdmin_txtBirthday_v').val());
            });
        });
    </script>
    <%--<script type="text/javascript">
        $(function () {
            $('#ContentCustomerAdmin_txtDateofBirth').datetimepicker({
                changeMonth: true, changeYear: true, timeFormat: "", dateFormat: "dd/mm/yy"
            });
        });
    </script>--%>
    <script>

        $(document).ready(function () {
            $('.img').click(function () {
                $('#file_company').click();
            });
        })

    </script>
    <script>
        function readURL(input) {
            if (input.files && input.files[0]) {
                var reader = new FileReader();
                reader.onload = function (e) {
                    $('.img')
                    .attr('src', e.target.result).width(250)
                .height(80);
                };
                reader.readAsDataURL(input.files[0]);
            }
        }
    </script>
    <script>

        jQuery(function () {
            $(document).on('click', '#btnChangePass', function (event) {
                var newpass = $("#txtNewPass").val() + '';
                var Rnewpass = $("#txtReNewPass").val() + '';
                var currentpass = $("#txtCurrentPass").val() + '';
                if (currentpass == "") { alert('Bạn chưa nhập mật khẩu hiện tại!'); return; }
                if (newpass == "") { alert('Bạn chưa nhập mật khẩu mới!'); return; }
                if (newpass != Rnewpass) { alert('Hai mật khẩu mới không giống!'); return; }
                if (currentpass == Rnewpass) { alert('Mật khẩu mới không được giống mật khẩu cũ!'); return; }
                alert(newpass + '-' + Rnewpass + '-' + currentpass);
                var url = "Profile.aspx/ChangePass";
                $.ajax({
                    type: "POST",
                    url: url,
                    data: "{currentpass:'" + $("#txtCurrentPass").val() + "', newpass:'" + $("#txtNewPass").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        alert(data.d);
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        // Handle errors here
                        console.log('ERRORS: ' + textStatus);
                        alert("Lưu không thành công!");
                        // STOP LOADING SPINNER
                    }
                });
            });
        });
    </script>
    <div class="tab-content">
        <div class="tab-pane active col-md-12 col-lg-12 col-sm-12 col-xs-12" id="thongtintk" style="padding: 0px;">
            <%--<div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding: 0px;">
                <h3>Thông tin cá nhân</h3>
            </div>--%>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px 10px 20px 0px; border-right: 1px solid #ddd;">
                <h3><b>Tài khoản</b></h3>
                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                    <fieldset>
                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                            Họ tên
                        </div>
                        <div class="col-md-10 col-xs-12 col-sm-12 col-lg-10" style="text-transform: none; padding: 0px;">
                            <asp:TextBox ID="txtHoTen" runat="server" CssClass="input_add"></asp:TextBox>
                        </div>
                    </fieldset>
                </div>
                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                    <fieldset>
                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                            Ngày sinh
                        </div>
                        <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="text-transform: none; padding: 0px;">
                            <%--<asp:TextBox ID="txtDateofBirth" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" runat="server"></asp:TextBox>--%>
                            <div id="txtBirthday" style="border-radius: 0px; padding-left: 0px; border: 1px solid #ddd"></div>
                            <asp:HiddenField runat="server" ID="txtBirthday_v"></asp:HiddenField>
                        </div>
                        <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="margin-top: 7px; text-transform: none; padding: 0px;">
                            Số điện thoại
                        </div>
                        <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="text-transform: none; padding: 0px;">
                            <asp:TextBox ID="txtSoDienThoai" runat="server" CssClass="input_add"></asp:TextBox>
                        </div>
                    </fieldset>
                </div>
                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                    <fieldset>
                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                            Địa chỉ
                        </div>
                        <div class="col-md-10 col-xs-12 col-sm-12 col-lg-10" style="text-transform: none; padding: 0px;">
                            <asp:TextBox ID="txtDiaChi" runat="server" CssClass="input_add" TextMode="multiline" Style="height: 100px; resize: none;"></asp:TextBox>
                        </div>
                    </fieldset>
                </div>
                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px;">
                    <button id="Button2" runat="server" class="btn btn-default pull-right" style="background: #eee; text-align: center; padding: 6px 15px; border-radius: 0px;" onserverclick="btnUpdate_Click">
                        <i class="fa fa-upload" style="margin-right: 10px;"></i>Cập nhật
                    </button>
                </div>
            </div>

            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                <div class="panel-group" id="accordion">
                    <div class="panel panel-default col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border-radius: 0px; padding: 0px;">
                        <div class="panel-heading col-md-12 col-xs-12 col-sm-12 col-lg-12" style="background: #fff; color: #aaa; padding: 10px;">
                            <h4 class="panel-title">Đổi mật khẩu
                            </h4>
                        </div>
                        <div id="change_pass" class="panel-collapse collapse in col-xs-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                            <div class="panel-body col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 0px; vertical-align: middle;">
                                    <div class="col-md-4 col-lg-4 col-sm-6 col-xs-12" style="padding: 10px;">
                                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                                            <input id="txtCurrentPass" class="input_add" type="password" style="font-weight: normal;" placeholder="Mật khẩu hiện tại" />
                                        </div>
                                    </div>
                                    <div class="col-md-4 col-lg-4 col-sm-6 col-xs-12" style="padding: 10px;">
                                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                                            <input id="txtNewPass" class="input_add" type="password" style="font-weight: normal;" placeholder="Mật khẩu mới" />
                                        </div>
                                    </div>
                                    <div class="col-md-4 col-lg-4 col-sm-6 col-xs-12" style="padding: 10px;">
                                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                                            <input class="input_add" id="txtReNewPass" type="password" style="font-weight: normal;" placeholder="Xác nhận mật khẩu" />
                                        </div>
                                    </div>
                                    <div class="col-md-12 col-lg-12 col-sm-6 col-xs-12" style="padding: 10px; text-align: right;">
                                        <span class="btn btn-default" style="border-radius: 0px; color: #aaa" id="btnChangePass">Cập nhật</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%-- <div class="tab-pane col-md-12 col-xs-12 col-sm-12 col-lg-12" id="dacquyen" style="padding:0px;">
        <H3>Các tính năng</H3>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:0px;">
            <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12" style="padding:5px;">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;border:1px solid #ddd;text-align:center;">Gửi Autoresponder</div>
            </div>
            <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12" style="padding:5px;">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;border:1px solid #ddd;text-align:center;">Gửi Broadcast</div>
            </div>
            <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12" style="padding:5px;">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;border:1px solid #ddd;text-align:center;">MailBox</div>
            </div>
            <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12" style="padding:5px;">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;border:1px solid #ddd;text-align:center;">Quét tiêu chuẩn HTML</div>
            </div>
            <div class="col-md-4 col-lg-4 col-sm-4 col-xs-12" style="padding:5px;">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;border:1px solid #ddd;text-align:center;">Theo dõi, thống kê</div>
            </div>
        </div>
      </div>
      <div class="tab-pane col-md-12 col-xs-12" id="sudung" style="padding:0px;">
        <div class="col-md-12 col-xs-12" style="padding:0px;"><H3>Thông tin sử dụng</H3></div>
          <div class="col-md-12 col-xs-12" style="padding:5px;">
              <div class="col-md-4 col-xs-12">
                  Số mail đã sử dụng :
                  <span class="pull-right">1200/3000</span>
              </div>
              <div class="col-md-6 col-xs-12" style="padding:5px;">
                  <div class="col-md-12 col-xs-12">
                      <div style="width:40%;background:#0d0;height:10px;color:#ccc;float:left;"></div>
                      <div style="width:60%;background:#ddd;height:10px;color:#ccc;float:left;"></div>
                  </div>
              </div>
              <div class="col-md-2 col-xs-12" style="padding:5px;font-weight:normal;">
                  Đây là gì ?
              </div>

          </div>
          <div class="col-md-12 col-xs-12" style="padding:5px;">
              <div class="col-md-4 col-xs-12">
                  Số tài nghuyên đã sử dụng :
                  <span class="pull-right">1 Gb/ 10 Gb</span>
              </div>
              <div class="col-md-6 col-xs-12" style="padding:5px;">
                  <div class="col-md-12 col-xs-12">
                      <div style="width:10%;background:#00d;height:10px;color:#ccc;float:left;"></div>
                      <div style="width:90%;background:#ddd;height:10px;color:#ccc;float:left;"></div>
                  </div>
              </div>
              <div class="col-md-2 col-xs-12" style="padding:5px;font-weight:normal;">
                  Đây là gì ?
              </div>
          </div>
          <div class="col-md-12 col-xs-12" style="padding:5px;">
              <div class="col-md-4 col-xs-12">
                  Số tài khoản đã tạo :
                  <span class="pull-right">6 User / 10 User</span>
              </div>
              <div class="col-md-6 col-xs-12" style="padding:5px;">
                  <div class="col-md-12 col-xs-12">
                      <div style="width:60%;background:#fa0;height:10px;color:#ccc;float:left;"></div>
                      <div style="width:40%;background:#ddd;height:10px;color:#ccc;float:left;"></div>
                  </div>
              </div>
              <div class="col-md-2 col-xs-12" style="padding:5px;font-weight:normal;">
                  Đây là gì ?
              </div>
          </div>
          <div class="col-md-12 col-xs-12" style="padding:5px;">
              <div class="col-md-4 col-xs-12">
                  Thời gian sử dụng dịch vụ :
                  <span class="pull-right">300 Days / 360 Days</span>
              </div>
              <div class="col-md-6 col-xs-12" style="padding:5px;">
                  <div class="col-md-12 col-xs-12">
                      <div style="width:85%;background:#d00;height:10px;color:#ccc;float:left;"></div>
                      <div style="width:15%;background:#ddd;height:10px;color:#ccc;float:left;"></div>
                  </div>
              </div>
              <div class="col-md-2 col-xs-12" style="padding:5px;font-weight:normal;">
                  Đây là gì ?
              </div>
          </div>
          <div class="col-md-12 col-xs-12" style="padding:15px;font-weight:normal;">
              Khi đạt mức cảnh báo thì bạn hãy nên <b>gia hạn</b> hoặc muốn <b>năng cấp</b> gói dịch vụ của mình để công việc của bạn và công ty không bị gián đoạn.<br/> Cảm ơn
          </div>
      </div>--%>
    </div>
</asp:Content>
